function Getdjsproto(){
    this.row = document.getElementById("row");
    this.round = document.getElementById("round");
    this.shi = document.getElementById("shi");
    this.min = document.getElementById("min");
    this.mz  = document.getElementById("mz");
    this.data = new Date();
    this.data2 = new Date("2019/11/22");
    this.seep;
    this.s;
    this.m;
    this.ms;
    this.timer;
    this.hous;
}

Getdjsproto.prototype.init = function(){
    this.Seep();
    this.setIn();
    this.setinter();
}

Getdjsproto.prototype.Seep = function(){
    // this.seep = (this.data2.getTime() - this.data.getTime())/1000;
    this.seep = (this.data.getHours()+1 - this.data.getHours())*60*60;
}

Getdjsproto.prototype.setinter = function(){
    if(this.seep < 0){
        this.shi.innerHTML = "00";
        this.min.innerHTML = "00";
        this.mz.innerHTML = "00";
    }
    // this.s = parseInt(this.seep/60/60);
    // this.m = parseInt((this.seep/60/60 - this.s)*60);
    // this.ms = parseInt(((this.seep/60/60 - this.s)*60 - this.m)*60);
    
    this.s = "0";
    this.m = parseInt(this.seep/60 - this.data.getMinutes()-1);
    this.ms = parseInt((this.seep/60 - this.data.getMinutes() - this.m)*60 - 60);
    this.hous = this.data.getHours() + 1;
    if(this.hous >= 24){
        this.hous = "0";
    }
    if(this.hous < 10){
        this.hous = "0" + this.hous;
    }
    this.round.innerHTML = this.hous + ":00场";
    this.shi.innerHTML = (this.s<10?"0"+this.s:this.s);
    this.min.innerHTML = (this.m<10?"0"+this.m:this.m);
    this.mz.innerHTML = (this.ms<10?"0"+this.ms:this.ms);
    return this;
}


Getdjsproto.prototype.setIn = function(){
    this.timer = setInterval(() => {
        if(this.seep < 0){
            // this.shi.innerHTML = "00";
            // this.min.innerHTML = "00";
            // this.mz.innerHTML = "00";
            // clearInterval(this.timer);
            // return;
            this.Seep();
        }
        this.seep--;
        this.setinter();
        // console.log(this.m);
        // if(this.seep < 0){
        //     this.shi.innerHTML = "00";
        //     this.min.innerHTML = "00";
        //     this.mz.innerHTML = "00";
        //     clearInterval(this.timer);
        // }
    }, 1000);
}


new Getdjsproto().init();